<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div id="app">
            <ul>
                <li>{{time1 | conversion}}</li>
                <li>{{time2 | conversion}}</li>
                <li>{{time3 | conversion}}</li>
            </ul>
        </div>
        <script src="js/vue.js"></script>
        <script>
            // [{"time": "1579657789851"}, {"time": "1563516693000"}, {"time": "1578539380000"}]
            new Vue({
                el: "#app",
                data: {
                    time1:1579657789851,
                    time2:1563516693000,
                    time3:1578539380000,
                },
                filters: {
                    //3.定义一个处理函数，参数value为要处理数据
                    'conversion': function (value) {
                        //调用Date的方法，处理时间戳
                        return new Date(value).toLocaleString();
                    },
                },
            })
        </script>
    </body>
</html>